package dblayer;

import org.junit.Test;

import modellayer.Company;
import static org.junit.Assert.fail;

public class CompanyDBTest
{
	CompanyDB cDB = new CompanyDB();
	Company company;
	
	@Test
	public void findComanyInDatabase()
	{
		int cvr;
		String info;
		String info2;
		
		try
		{
			cvr = 30311604;
			company = cDB.findCompanyByCvr(cvr);
			info = "Company Name: " +company.getName();
			info2 = "KeyPerson associations: " +company.getKeyPersonObj().size();
			System.out.println(info);
			System.out.println(info2);
		}
		catch (Exception e)
		{
			fail("Failed to find Company. Exception: " +e);
		}
	}
}
